<script lang="ts" setup>
import { ref } from "vue";
import GrandChild from './GrandChild.vue'

defineOptions({
    name: "Child",
});

// defineProps(['add'])
//--================= Data


//--================= Methods
function add1() {
    // console.log($attrs);

}

//--================= Other


</script>

<template>
    <div class="main2">
        <h4>子组件</h4>
        <GrandChild v-bind="$attrs" />
        <br>

        a :{{ $attrs.a }} <br>
        <button @click="add1()">子 Add</button>

    </div>



</template>

<style scoped>
.main2 {
    background-color: skyblue;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px;
    min-height: 300px;
}
</style>
